#!/bin/bash
wget http://www.lika.be/uushuus_stats/blind_settings_today.xml

# Check if we received new settings
if [ ! -e blind_settings_today.xml.1 ]; then
 echo "No new settings available"
 exit
fi

# Check if we received a valid file (quit if size is zero)
if [ ! -s blind_settings_today.xml.1 ]; then
 echo "File is zero size, refusing to update!"
 rm blind_settings_today.xml.1
 exit
fi

# Update the file
mv blind_settings_today.xml.1 blind_settings_today.xml

echo "Done!"


